package com.abc.http.example.high.token;

import org.springframework.http.HttpMethod;

import com.yansl.http.annotation.Http;
import com.yansl.http.annotation.Param;
import com.yansl.http.annotation.URI;

/**
 * @description: token 接口获取
 * @author: yansl.cn
 * @create: 2023-01-18 09:43
 */
@Http
public interface TokenAPI {

    /**
     * get请求获取
     * 
     * @param appId
     * @param secret
     * @return
     */
    @URI(httpMethod = HttpMethod.GET, uri = "${remot.path}/high/token/api/v1/token", intercepter = TokenHttpIntercepter.class)
    Token getTokenV1(@Param("appId") String appId, @Param("secret") String secret);

    /**
     * post请求获取
     * 
     * @param tokenParam
     * @return
     */
    @URI(httpMethod = HttpMethod.POST, uri = "${remot.path}/high/token/api/v2/token", intercepter = TokenHttpIntercepter.class)
    Token getTokenV2(TokenParam tokenParam);
}
